<div id="content">
	<div class="row s_page_title">
		<sa-big-breadcrumbs [items]="['系统配置','固件管理']" icon="fa fa-cog" class="col-xs-12 col-sm-7 col-md-7 col-lg-4"></sa-big-breadcrumbs>
	</div>
	<sa-widgets-grid>
		<div class="s_table">
			<div sa-widget [editbutton]="false" color="darken" class="clearfix">
				<header><span class="widget-icon"> <i class="fa fa-table"></i> </span><h2>固件管理</h2></header>
				<div>
					<div class="widget-body no-padding">
						<div class="page-header clearfix s_table_opreation">
							<div class="left page-header-btn">
								<button  type="button"  class="btn btn-primary" style="height: 28px;padding: 0 12px;line-height: 28px;" (click)="up_bin('new')" *ngIf="binUpload">bin文件上传</button>
							</div>
							<div class="right top-search">
								<input type="text" [(ngModel)]="searchKey" (change)="table_search(searchKey)" class="search-input" placeholder="名称...">
								<span class="top-search-box">
							        <button class="top-search-btn" type="button" (click)="table_search(searchKey)"> <i class="fa fa-search"></i></button>
							    </span>
							</div>
						</div>
						<div class="table_scroll">
							<table class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
								<thead>
									<tr>
										<th>名称</th>
										<th>大小(字节)</th>
										<th>版本号</th>
										<th>默认固件</th>
										<th>包个数</th>
										<th>包大小</th>
										<th>关联公司</th>
										<th>车辆用途</th>
										<th>用途分类</th>
										<th>APP升级</th>
										<th>描述</th>
										<th>协议版本</th>
										<th>硬件版本</th>
										<th>MD5</th>
										<th>上传时间</th>
										<th *ngIf="binDeleteBatch">操作</th>
									</tr>
								</thead>
								<tbody>
									<tr *ngFor="let row of tableData" >
										<td>{{row.binName}}</td>
										<td>{{row.binSize}}</td>
										<td>{{row.version}}</td>
										<td>
											<span *ngIf="row.isDefault == 1">是</span>
											<span *ngIf="row.isDefault == 0">否</span>
										</td>
										<td>{{row.packetTotal}}</td>
										<td>{{row.packetSize}}</td>
										<td>{{row.companyName}}</td>
										<td>{{row.useTypeL1}}</td>
										<td>{{row.useTypeL2}}</td>
										<td>
											<span *ngIf="row.appSupport == 1">支持</span>
											<span *ngIf="row.appSupport == 0">不支持</span>
										</td>
										<td>{{row.description}}</td>
										<td>
											<span *ngIf="row.protocolVersion == 1">第一代</span>
											<span *ngIf="row.protocolVersion == 2">第二代</span>
											<span *ngIf="row.protocolVersion == 3">808协议</span>
										</td>
										<td>
											<span *ngIf="row.hwVersion == 4">V4</span>
											<span *ngIf="row.hwVersion == 5">V5</span>
											<span *ngIf="row.hwVersion == 7">V7</span>
											<span *ngIf="row.hwVersion == 8">V8</span>
											<span *ngIf="row.hwVersion == 9">V9</span>
											<span *ngIf="row.hwVersion == 10">V10</span>
										</td>
										<td>{{row.mD5}}</td>
										<td>{{row.uploadDate}}</td>
										<td *ngIf="binDeleteBatch">
											<button type="button" (click)="del_bin(row)">删除</button>
										</td>
									</tr>
								</tbody>
							</table>
						</div>
						<div class="table-fix clearfix">
							<paginator [totalRecords]="totalCount"
						           [rows]="pageSize"
						           [currentPage]="curPage - 1"
						           (onPageChange)="paginate($event)">
							</paginator>
							<button type="button" class="btn default refresh_btn" (click)="refresh()"><i class="fa fa-refresh"></i></button>
						</div>
					</div>
				</div>
			</div>
		</div>
	</sa-widgets-grid>
</div>
